<%--
  Created by IntelliJ IDEA.
  User: 铃
  Date: 2024/9/29
  Time: 10:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1 align="center">新增学生信息</h1>
<div id="add" style="text-align: center" align="center">
  <form action="/flowerServlet?opr=add" method="post">
    <table align="center" style="text-align: center;height: 10px" border="1" cellpadding="0" cellspacing="0" width="30%">
      <tr>
        <td>花卉名称</td>
        <td>
          <input type="text" name="name" class="name">
        </td>
      </tr>
      <tr>
        <td>别名</td>
        <td>
          <input type="text" name="bieming" class="bieming">
        </td>
      </tr>
      <tr>
        <td>科属</td>
        <td>
          <input type="text" name="keshu" class="keshu">
        </td>
      </tr>
      </tr>
      <tr>
        <td>价格（元/支）</td>
        <td>
          <input type="text" name="price" class="price">
        </td>
      </tr>
      <tr>
        <td>原产地</td>
        <td>
          <input type="text" name="address" class="address">
        </td>
      </tr>

      <tr>
        <td colspan="2">
          <input type="submit" value="提交" id="addIsSuccess" id="yanzheng">
          <input type="reset" value="清空">
        </td>
      </tr>
    </table>
  </form>

</div>
<script src="js/jquery.js"></script>
<script>
  $("#yanzheng").click(function (){
    if (($(".name").value)==null){
      alert("名称不能为空");
    }
  })

</script>
</body>
</html>
